package com.test;

import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;

public class EnhanceObjectInputStream extends ObjectInputStream {
    public EnhanceObjectInputStream(InputStream in) throws IOException {
        super(in);
    }

    @Override
    public String readUTF() throws IOException {
        byte result =readByte();
        if (result == 0) {
            return null;
        }
        String s = super.readUTF();
        return s;
    }
}

